package com.zhao.service.task;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * 异步任务
 * 
 * @author zhaoyongfei
 *
 */
@Component
public class AsyncTask {

	protected static final Logger logger = LoggerFactory.getLogger(AsyncTask.class);

	@Async
	public void exec() {
		logger.debug("{}AsyncTask 开始执行 ", Thread.currentThread().getName());

		// ...

		logger.debug("{}AsyncTask 结束执行 ", Thread.currentThread().getName());
	}

}
